package tdca.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.app.Activity;
import android.content.Intent;

public class MainActivity extends Activity {
	private Button btn_goto_Capture2DCode = null;
	private Button btn_goto_Authentication = null;
	private Button btn_goto_PrivateQA = null;
	private Button btn_goto_Help = null;
	private Button btn_goto_Exit = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		btn_goto_Capture2DCode = (Button) findViewById(R.id.btn_goto_capture);
        btn_goto_Authentication = (Button) findViewById(R.id.btn_goto_authentication);
        btn_goto_PrivateQA = (Button) findViewById(R.id.btn_goto_privateQA);
        btn_goto_Help = (Button) findViewById(R.id.btn_goto_help);
        btn_goto_Exit = (Button) findViewById(R.id.btn_goto_exit);
	}

    @Override
    protected void onResume() {
        super.onResume();    //To change body of overridden methods use File | Settings | File Templates.
        btn_goto_Capture2DCode.setOnClickListener(new Listener_btn_goto_Capture2DCode());
        btn_goto_Authentication.setOnClickListener(new Listener_btn_goto_Authentication());
        btn_goto_PrivateQA.setOnClickListener(new Listener_btn_goto_PrivateQA());
        btn_goto_Help.setOnClickListener(new Listener_btn_goto_Help());
        btn_goto_Exit.setOnClickListener(new Listener_btn_goto_Exit());
        
    }

    class Listener_btn_goto_Capture2DCode implements View.OnClickListener{
        public void onClick(View view) {
            //To change body of implemented methods use File | Settings | File Templates.
            Intent intent = new Intent();
            intent.setClass(MainActivity.this,Capture2DCode.class);
            MainActivity.this.startActivity(intent);
        }
    }

    class Listener_btn_goto_Authentication implements View.OnClickListener{
        public void onClick(View view) {
            //To change body of implemented methods use File | Settings | File Templates.
            Intent intent = new Intent();
            intent.setClass(MainActivity.this,Authentication.class);
            MainActivity.this.startActivity(intent);
        }
    }

    class Listener_btn_goto_PrivateQA implements View.OnClickListener{
        public void onClick(View view) {
            //To change body of implemented methods use File | Settings | File Templates.
            Intent intent = new Intent();
            intent.setClass(MainActivity.this,PrivateQA.class);
            MainActivity.this.startActivity(intent);
        }
    }

    class Listener_btn_goto_Help implements View.OnClickListener{
        public void onClick(View view) {
            //To change body of implemented methods use File | Settings | File Templates.
            Intent intent = new Intent();
            intent.setClass(MainActivity.this,Help.class);
            MainActivity.this.startActivity(intent);
        }
    }

    class Listener_btn_goto_Exit implements View.OnClickListener{
        public void onClick(View view) {
            //To change body of implemented methods use File | Settings | File Templates.
            Intent MyIntent = new Intent(Intent.ACTION_MAIN);
            MyIntent.addCategory(Intent.CATEGORY_HOME);
            startActivity(MyIntent);
            MainActivity.this.finish();
        }
    }
	
}
